import React, {Component} from 'react'

export default class Child extends Component {
    state = {
        // users: [
        //     {id: '001', name: 'tom', age: 18},
        //     {id: '002', name: 'tims', age: 20},
        //     {id: '003', name: 'jerry', age: 19},
        //     {id: '004', name: 'jokei', age: 20},
        //     {id: '005', name: 'jack', age: 21}
        // ]
        users: '001'
    }

    render() {
        return (
            <div>
                <h2>我是Child组件</h2>
                {
                    this.state.users.map((user) => {
                        return <h4 key={user.id}>{user.name}---{user.age}</h4>
                    })
                }
            </div>
        )
    }
}